<template>
  <div>
    <div class="main">
      <h1>测试递归</h1>
      <Comment v-for="(item,index) in testList" :key="index" :comment="item" class="comment" />
    </div>
  </div>
</template>

<script>
import Comment from "@/components/test/comment";
export default {
  components: {
    Comment
  },
  data() {
    return {
      testList: [
        {
          content: "得好好夸夸自己"
        },
        {
          content: "天仙下凡",
          parent: {
            content: "得好好夸夸自己"
          }
        },
        {
          content: "这是真的吗？",
          parent: {
            content: "天仙下凡",
            parent: {
              content: "得好好夸夸自己"
            }
          }
        }
      ]
    };
  }
};
</script>

<style lang="less" scoped>
.comment {
  width: 600px;
  border: 1px solid #5488b5;
  margin: 10px;
}
</style>